#include<stdio.h>

int main(){
	int Total,n,a,b,c,d;
	scanf("%d %d",&Total,&n);
	for( int i=0; i<n; i++ ){
		scanf("%d %d %d %d",&a,&b,&c,&d);
		if( Total==0 ){
			printf("Game Over.");break;
		}else if( c<=Total ){
			if( (b==0&&a>d)||(b==1&&a<d) ){
					Total+=c;
					printf("Win %d!  Total = %d.\n",c,Total);
				}else{
					Total-=c;
					printf("Lose %d.  Total = %d.\n",c,Total);
				}
		}else{
			printf("Not enough tokens.  Total = %d.\n",Total);
		}
	}
	return 0;
}
